﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LanUserSeeThroughRouter
{
    public class LanUser
    {
        public static int TimeSpan;
        public string Mac { get; set; }
        public string IP { get; set; }
        public string State { get; set; }

        private int recPacketsCount;
        private int sendPacketsCount;

        public int RecPacketsCount
        {
            get
            { return recPacketsCount; }
            set
            {
                int delta = value - recPacketsCount;
                if (delta > 0)
                {
                    RecSp = delta / TimeSpan;
                }
                recPacketsCount = value;
            }
        }
        public int SendPacketsCount
        {
            get
            {
                return sendPacketsCount;
            }
            set
            {
                int delta = value - sendPacketsCount;
                if (delta > 0)
                {
                    SendSp = delta / TimeSpan;
                }
                sendPacketsCount = value;
            }
        }
    
        public int RecSp { get; set; }
        public int SendSp { get; set; }
    }
}
